//
//  AVPlayerCollectionViewCell.m
//  ReviewDemo
//
//  Created by 龙 on 2018/5/10.
//  Copyright © 2018年 long. All rights reserved.
//

#import "AVPlayerCollectionViewCell.h"
#import <Masonry.h>

@implementation AVPlayerCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        [self.contentView addSubview:self.adressLable];
        [self.contentView addSubview:self.videoView];
        
        [self.adressLable mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.mas_equalTo(10);
            make.right.mas_equalTo(-10);
            make.height.mas_equalTo(20);
        }];
        [self.videoView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.adressLable.mas_bottom).with.offset(10);
            make.left.bottom.mas_equalTo(10);
            make.right.mas_equalTo(-10);
        }];
        
        self.layer.borderWidth = 1;
        self.layer.borderColor = [UIColor redColor].CGColor;
        self.layer.cornerRadius = 8;
        self.clipsToBounds = YES;
    }
    return self;
}









#pragma mark - setter and getter

- (UILabel *)adressLable
{
    if (_adressLable == nil)
    {
        UILabel *lable = [[UILabel alloc] init];
        lable.backgroundColor = [UIColor clearColor];
        _adressLable = lable;
    }
    return _adressLable;
}

- (UIView *)videoView
{
    if (_videoView == nil)
    {
        UIView *view = [[UIView alloc] init];
        
        _videoView = view;
    }
    return _videoView;
}

@end
